-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand extractSymbol ranges #42770
Expand extractSymbol ranges #42770
Conversation
cc @mjbvz |
Does this resolve #41469 or is it just related? That issue seems to be about doing this for all refactorings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly questions.
I expect that #41469 only relates to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #41469
When a refactor is invoked through a keyboard command we search a bit harder for the extract symbol refactor by treating the selected span as though it covers the tokens containing the start and end tokens.
That is, selecting
will be equivalent to selecting
for the purposes of offering the refactor to extract
bar + baz
.I also separated out the unit tests into individual tests so we can tell them apart on failure.